package com.wondersgroup.mapper;

import com.wondersgroup.entity.Company;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

@Mapper
@Repository
public interface CompanyMapper {


  Company getCompanyById(String id);
  /**
   * 根据手机号获取对象
   * @param sjh
   * @return
   */
  Company getBySjh(String sjh);

  /**
   * 判断是否注册
   * @param sjh
   * @param zjhm
   * @return
   */
  Company isRegister(@Param("sjh") String sjh,@Param("zjhm") String zjhm);

  /**
   *  注册
   */
  int register(Company company) throws Exception;


  /**
   *  根据sjh zjhm 查询 单位名称
   */

   String getDwmc(@Param("sjh") String sjh, @Param("zjhm") String zjhm,@Param("yxbz") String yxbz) throws Exception;


  /**
     * 获取全部的机构
     * @return
     */
    List<Company> getAllCompanys();

}
